package com.panshi.service;


import com.panshi.entity.AppEssayT;
import com.panshi.entity.ClassifyT;
import com.panshi.service.impl.ZxClientServiceFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Service
@FeignClient(value = "HASBEI-ZX-PROVIDER-8002-XHLMR",fallbackFactory = ZxClientServiceFallbackFactory.class)
public interface ZxClientService {

    @GetMapping("/app-essay-t/zxAll")
    public List<AppEssayT> zxAll();

    @GetMapping("/app-essay-t/zxbyid/{id}")
    public AppEssayT zxbyid(@PathVariable Integer id);

    @GetMapping("/app-essay-t/zxPage/{page}/{limit}/{type}")
    public List<AppEssayT> zxPage(@PathVariable int page, @PathVariable int limit, @PathVariable String type);

    @ApiOperation("咨询分页查询  cid分类  page咨询页数 ，limit 多少  type排序")
    @GetMapping("/app-essay-t/zxCPage/{cid}/{page}/{limit}/{type}")
    public List<AppEssayT> zxCPage(
            @PathVariable("cid") int cid,
            @PathVariable("page") int page,
            @PathVariable("limit") int limit,
            @PathVariable("type") String type);

    @GetMapping("/classify-t/all")
    public List<ClassifyT> call();

    @GetMapping("/classify-t/bycid/{id}")
    public ClassifyT bycid(@PathVariable("id") Integer id);

}
